package com.jt.www.domain.enums.wxb;

import org.apache.commons.lang3.StringUtils;

/**
 * 内部业绩 保单状态   1-已出单，2-已退保
 * Created by shaoyn on 2020/07/21.
 */
public enum PerformancePolicyStatusEnum {
    INSURED("1", "已出单"),
    CANCELLATION("2", "已退保");
    /**
     * 状态
     */
    private String status;
    /**
     * 描述
     */
    private String desc;

    PerformancePolicyStatusEnum(String status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static String getDestByStatus(String status) {
        if (StringUtils.isBlank(status)) {
            return "";
        }
        for (PerformancePolicyStatusEnum performancePolicyStatusEnum : PerformancePolicyStatusEnum.values()) {
            if (performancePolicyStatusEnum.status.equals(status)) {
                return performancePolicyStatusEnum.desc;
            }
        }
        return "";
    }

    public String getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }
}
